package cn.tedu.basic;

import java.util.Scanner;

public class Test5_If {
    public static void main(String[] args) {
        System.out.println("请您输入原价：");
        double price = new Scanner(System.in).nextDouble();

        double DisPrice = price;
        if (price >= 5000) {
            DisPrice = price * 0.5;
        } else if (price >= 2000) {
            DisPrice = price * 0.8;
        } else if (price >= 1000){
            DisPrice = price * 0.9;
        }
        System.out.println("原价是："+price+",折后价是："+DisPrice);
    }
}
